<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
	<cfif IsUserInRole("Super User")>
		<cfinclude template="#request.pathToUI#/grids/howDidWeDo.cfm" />
	<cfelse>
		<h1>Unavailable</h1>
		<p>We are updating and expanding the How Did We Do report for the 2014-2015 workshop season. Please check back soon.</p>
	</cfif>
<cfelse>
	<div class="row">
		<div class="banner prepare-banner">
			<div class="banner-text">
				<span class="banner-header">How Did We Do?</span><br />
				<span class="banner-subheader">The Cash for College program performance report</span>
			</div>
		</div>
	</div>
	<div class="row body-row">
		<div class="span3">
			<ul class="nav nav-tabs nav-stacked sidenav">
				<!--- <li><a href="#best-practices">Best Practices</a></li> --->
				<li><a href="#overview">Overview</a></li>
				<li><a href="#reports">How Did We Do Reports</a></li>
				<li><a href="#data">Source Of Data</a></li>
			</ul>
		</div>
		<div class="span9 content">
		
			<section id="overview">
				<h3>Overview</h3>
				<p>Cash for College is making workshop and application data available in a new, customized, trended infographic format at the site, organization, county, region and state level.  Cash for College organizers at all levels have been able to download raw workshop data from within secure organizational accounts, but until 2013 did not have access to charted information. Now specific data is described visually for each program year that there is data, providing trend information for the first time.</p>
				
				<p>For information on where we get data to compile this report see the Source Of Data section below.</p>
			</section>
			
			<section id="reports">		
				<cfparam name="programYear" type="string" default="2013-2014" />
				
				<cfoutput>
					<h3>How Did We Do Reports</h3>
				</cfoutput>
				
				<cfscript>
					siteGateway = new assets.calgrants.com.gateway.SiteGateway();
					sites = siteGateway.query(Organization_ID = request.authUser.organizationID);
					workshopGateway = new assets.calgrants.com.gateway.WorkshopGateway();
					workshops = workshopGateway.query(Organization_ID = request.authUser.organizationID, Program_Year = programYear, Manager_ID = IIf(IsUserInRole("Site Contact"), request.authUser.userID, ""));
				</cfscript>
				
				<cfquery name="GetTotalStudentCount" dbtype="query">
					select sum(Student_Count) as Total_Student_Count
					from workshops
				</cfquery>
				
				<script type="text/javascript">
					submitProgramYearForm = function() {
						document.getElementById("programYearForm").submit();
					}
				</script>
				
				<cfform id="programYearForm" action="#script_name#" method="post">
					<cfinput type="hidden" name="view" value="#view#">
					<div class="clearfix">
						<label>Program Year</label>
						<cfselect name="programYear" size="1" multiple="false" required="yes" message="Program Year filter is required" style="width: 150px;" onChange="submitProgramYearForm();">
							<cfoutput>
								<cfloop index="y" from="2012" to="2013">
									<cfset py = "#y#-" & y+1>
									<option value="#py#"<cfif programYear eq py> selected</cfif>>#py#</option>
								</cfloop>
							</cfoutput>
						</cfselect>
					</div>
				</cfform>

				<cfif workshops.RecordCount gt 0 and GetTotalStudentCount.Total_Student_Count gt 0>
				
					<script type="text/javascript">
						<cfoutput>
							var userID = #GetAuthUser()#;
							var programYear = "#programYear#";
						</cfoutput>
						var rollupLevel = "";
						var rId = 0;
						openShareModal = function(r, i) {
							rollupLevel = r;
							rId = i;
							$("#shareModal").modal("show");	
						}
						shareHowDidWeDoReport = function() {
							var shareMessage = $("#shareMessage").val();
							var shareEmail = $("#shareEmail").val();
							$.ajax({
								type: "post",
								url: "/assets/calgrants/com/API.cfc?method=shareHowDidWeDoReport",
								data: {"shareMessage": shareMessage, "shareEmail": shareEmail, rollupLevel: rollupLevel, ID: rId, User_ID: userID, Program_Year: programYear},
								async: true,
								cache: false,
								dataType: "json",
								success: function(response, textStatus, jqXHR){
									alert("How Did We Do report has been shared");
									$("#shareModal").modal("hide");
								},
								error: function(jqXHR, textStatus, errorThrown){
									alert("Error sharing How Did We Do report");
									$("#shareModal").modal("hide");
								}
							});
						}
						$(function() {
							$("#shareModal").modal({
								show: false,
								backdrop: "static"	
							});	
						})
					</script>
					
					<cfform id="shareForm" onsubmit="shareHowDidWeDoReport(); return false;">
						<div id="shareModal" class="modal hide">
							<div class="modal-header">
								<h3>Share How Did We Do</h3>
							</div>
							<div class="modal-body">
								<div class="container-fluid">
									<div class="row-fluid">
										<div class="span12">
											<p>Share your How Did We Do report by e-mail.  Enter an e-mail address and message below and we will send a link to your How Did We Do report.</p>
											<div class="clearfix">
												<label class="required" for="shareMessage">Message</label>
												<cftextarea id="shareMessage" name="shareMessage" required="yes" message="Message is required" rows="3" class="span9"></cftextarea>
											</div>
											<div class="clearfix">
												<label class="required" for="shareEmail">E-mail</label>
												<cfinput type="text" id="shareEmail" name="shareEmail" value="" required="yes" validate="email" message="E-mail is required and must be a valid e-mail address" maxlength="100" class="span9">
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<button class="btn btn-success" data-dismiss="modal" aria-hidden="true">Close</button>
								<button type="submit" name="shareButton" class="btn btn-success">Share</button>
							</div>
						</div>
					</cfform>
					
					<h4>Organization Report</h4>
					
						<cfoutput>	
							<a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo.cfm?Organization_ID=#request.authUser.organizationID#&Program_Year=#programYear#" target="_blank" class="btn btn-success">View Report</a>&nbsp;
							<a href="##" onclick="openShareModal('organization', #request.authUser.organizationID#, '#programYear#'); return false;" class="btn btn-success">Share Report</a>
						</cfoutput>
						
					<h4>Workshop Reports</h4>
					
					<table id="workshopsTable" class="table table-hover table-bordered">
						<thead>
							<tr>
								<th>Workshop</th>
								<th nowrap="nowrap">Exit Surveys</th>
								<th>Online</th>
								<th class="action"></th>
							</tr>
						</thead>
						<tbody>
							<cfoutput query="workshops">
								<cfif Approved>
								<tr>
									<td>#Site#<br />#DateFormat(Workshop_Date, "m/d/yyyy")# #TimeFormat(Start_Time, "h:mmtt")#-#TimeFormat(End_Time, "h:mmtt")#</td>
									<td>#Student_Count#</td>
									<td>#YesNoFormat(Online)#</td>
									<td nowrap="nowrap">
										<cfif Student_Count gt 0>
											<div class="btn-group">
												<a href="##" class="btn btn-success btn-block dropdown-toggle" data-toggle="dropdown" style="width: 90px;">
													Select&nbsp;&nbsp;&nbsp;<span class="caret"></span>
												</a>
												<ul class="dropdown-menu">
													<!--- <li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v0.1.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v0.1</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v0.2.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v0.2</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v0.3.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v0.3</a></li> --->
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v1.0.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v1.0</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v2.0.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v2.0</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v2.5.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v2.5</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v3.0.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v3.0</a></li>
													<li><a href="http://#cgi.http_host#/assets/calgrants/ui/printable/howDidWeDo_v3.5.cfm?Workshop_ID=#Workshop_ID#&Program_Year=#programYear#" target="_blank">View Report v3.5</a></li>
													<li><a href="##" onclick="openShareModal('workshop', #Workshop_ID#, '#programYear#'); return false;">Share Report</a></li>
												</ul>
											</div>
										<cfelse>
											No participants
										</cfif>
									</td>
								</tr>
								</cfif>
							</cfoutput>
							
						</tbody>
					</table>
				<cfelse>
					<div class="alert alert-info notFound">No reports are available</div>
				</cfif>
				
			</section>

			<section id="data">
				<h3>Source Of Data</h3>
				<p>Each year California Cash for College collects participant exit surveys at the time of the workshop. How Did We Do summaries aggregate distinct participant exit surveys to create online reports. Participant FAFSA, California Dream Act Application and Cal Grant Application data was extracted from the California Student Aid Commission Grant Delivery System (GDS).</p>
				
				<hr />

				<h4>FAFSA/DREAM ACT APPLICATIONS</h4>
				
				<p>The Free Application for Federal Student Aid (FAFSA) and the CA Dream Act Application are gateway applications for grant financial aid in California. Application counts are grouped together.</p>
				
				<p><strong>SUBMITTED/COMPLETED FAFSAs & CA Dream Act Applications:</strong></p>
				
				<p><strong>Submitted:</strong> Aggregate count of Free Application for Federal Student Aid (FAFSAs) & CA Dream Act Applications submitted by workshop, organization, county, region, or state levels. Percentage is based on FAFSA/Dream Act Applications submitted from all Cash for College participants.</p>
				
				<p><strong>Completed:</strong> Aggregate count of Free Application for Federal Student Aid (FAFSAs) & CA Dream Act Applications submitted AND that can be processed for financial aid. This means applications that have generated an Expected Family Contribution (EFC). Percentage is based on FAFSA/Dream Act Applications that have EFC, which means they can be processed for financial aid consideration.</p>
				
				<p><strong>Estimated Pell Grants:</strong> The federal government provides states Pell eligibility for each completed FAFSA. Using Pell eligibility for each qualifying applicant, and the most recently available average Pell Grant award, estimated Pell grant funding is displayed.</p>
				
				<hr />
				
				<h4>CAL GRANT APPLICATIONS</h4>
				<p><strong>Submitted:</strong> Number of students who submitted a FAFSA or Dream Act Application and a Cal Grant GPA. Percentage is based on Cal Grant applications submitted from all workshop participants.</p>
				
				<p><strong>Completed:</strong> Students who submitted a complete FAFSA or Dream Act Application (one that has an EFC) and Cal Grant GPA by the March 2 deadline. Percentage is based on Cal Grant Applications that were complete and received by the deadline.</p>
				
				<p><strong>Offered:</strong> Number and percentage of applicants who were offered a Cal Grant Award.</p>
				
				<p>Cal Grant Funding Offered: Using Commission Cal Grant award offer amounts, aggregated dollar amounts are displayed.</p>

				<hr />

				<h4>WORKSHOP RATING</h4>
				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p>  
			
				<hr />
				
				<h4>ATTENDANCE by GENDER</h4>
				<p>Percentages may not add up to 100 because students may have skipped the question, or answered declined to state.</p>
				
				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p>

				<hr />
				
				<h4>SENIOR ATTENDANCE</h4>
				<p>Percentages may not add up to 100 because students may have skipped the question.</p>
				
				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p>
				
				<hr />
				
				<h4>ATTENDANCE by RACE/ETHNICITY</h4>
				<p>Percentages may exceed 100 percent as students may have marked more than one race/ethnicity.</p>

				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p> 

				<hr />

				<h4>PARENT EDUCATION LEVEL</h4>
				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p>
				
				<hr />
				
				<h4>ATTENDED with PARENTS</h4>
				<p>The definition of "Parents" includes guardians. The question is phrased: Did you attend with your parent/ guardian?</p>
				
				<p><strong>Source:</strong> California Cash for College Student Exit Survey collected at the workshop either electronically or by paper.</p>

				<hr />

				<h4>OTHER CATEGORIES</h4>
				<p><strong>Computer based workshop:</strong> the workshop offered access to computers to offer students direct access to application completion.</p>
				
				<p><strong>Lead Organization:</strong> Cash for College involves multiple partners. The Lead Organization registers the workshop and takes a primary role in managing logistics for the workshop.</p>
				
				<p><strong>Organization Since:</strong> Cash for College workshops have been offered since 2003 and data collected each and every year. Cash for College began matching participant data to the Commission's GDS since 2005. This data engine uses data beginning in the 2009 year.</p>
				
				<p><strong>Follow Up Requests/Used Follow Up Platform:</strong> Each year, across all workshops statewide, about a third of students request some form of follow up assistance. Offering Follow Up assistance is part of the Cash for College model. In 2013 Cash for College launched a Student Follow Up tracking feature to assist students after the workshop to meet the March 2 deadline.</p>
				
				<p><strong>Scholarship Awarded:</strong> Since 2005, Cash for College has offered incentive scholarships for qualifying workshops to help students maximize their financial aid by applying for a Cal Grant.</p>


			</section>
			
		</div>
	</div>
</cfif>




